//
//  MDHNavigationControllerStack.h
//  JSTech
//
//  Created by 高得华 on 2019/4/25.
//  Copyright © 2020 华&梅. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol MDHViewModelServices;

NS_ASSUME_NONNULL_BEGIN

@interface MDHNavigationControllerStack : NSObject
/// Initialization method. This is the preferred way to create a new navigation controller stack.
///
/// services - The service bus of the `Model` layer.
///
/// Returns a new navigation controller stack.
- (instancetype)initWithServices:(id<MDHViewModelServices>)services;

/// Pushes the navigation controller.
///
/// navigationController - the navigation controller
- (void)pushNavigationController:(UINavigationController *)navigationController;

/// Pops the top navigation controller in the stack.
///
/// Returns the popped navigation controller.
- (UINavigationController *)popNavigationController;

/// Retrieves the top navigation controller in the stack.
///
/// Returns the top navigation controller in the stack.
- (UINavigationController *)topNavigationController;

/// Retrieves the top viewcontroller in the stack.
///
/// Returns the top viewcontroller in the stack.
- (UIViewController *)topViewController;

///设置 window
@property (nonatomic, weak) UIWindow * window;

@end

NS_ASSUME_NONNULL_END
